#include<iostream>

using namespace std;

void strencode(char *p);

int main( )
{
    char p[80];
   
    cin>>p;
    cout<<p<<endl;

    strencode(p);

    cout<<p<<endl;

    cin>>p;
    return 0;
}

void strencode(char *p)
{
    while(*p!='\0')
    {
        if(*p>='a'&&*p<='z') *p=*p-3;
        else if(*p>='A'&&*p<='Z') *p=*p+3;

        p++;
    }
}